<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      text-align: center;
      line-height: 100px;
      width: 200px;
      height: 100px;
      border: 2px solid #000;
      margin: 0 auto;
    }
  </style>
</head>

<body>
  <div id="app">
    <button @click="flag=!flag">change</button>
    <div class="box" v-show="flag">我是v-show控制的盒子</div>
  </div>
  <script src="../../javascript//vue.js"></script>
  <script>
    /*
   v-show
      预期：any
      用法：根据表达式之真假值，切换元素的 display CSS property。
      当条件变化时该指令触发过渡效果
     */
    const vm = new Vue({
      el: "#app",
      data() {
        return {
          flag: true
        }
      }
    })
  </script>
</body>

</html>